package gateway

import "github.com/unkeyed/unkey/go/pkg/assert"

type Config struct {
	GatewayID string

	WorkspaceID string

	// EnvironmentID identifies which environment this gateway serves
	// A single environment may have multiple deployments, and this gateway
	// handles all of them based on the deployment ID passed in each request
	EnvironmentID string

	Platform string

	Region string

	HttpPort int

	DatabasePrimary         string
	DatabaseReadonlyReplica string

	OtelEnabled           bool
	OtelTraceSamplingRate float64
	PrometheusPort        int
}

func (c Config) Validate() error {
	return assert.All(
		assert.NotEmpty(c.WorkspaceID, "workspace ID is required"),
		assert.NotEmpty(c.EnvironmentID, "environment ID is required"),
	)
}
